WebForm.gotoUrl

Displays the specified URL in the user's browser, terminates execution of the current form and commits the current transaction. Form memory is freed, and return to the Ebase form is not possible. Navigation back to the form using the browser back button is not possible.

Execution of this method immediately terminates the event currently being executed, no statements past this method call will be executed. This method can only be called within the context of a web form event. When called from any other context, e.g. a JSP, a RuntimeException is thrown.

Http protocol of either GET or POST can be specified, where GET is the default.

It is best practice to pass any parameters via the parameters Map (example 1 below). However, if parameters are added to the URL directly, these should be encoded (example 2 below). Parameters passed via the parameters Map should not be encoded as this is done automatically by the system.

Javascript example 1 (using parameters Map):

 var parms = {};
 parms.status = fields.APPL_STATUS.displayValue;
 parms.next = "MENU";
 form.gotoUrl("mainmenu.jsp", parms, form.HTTP_PROTOCOL_GET);
 

Javascript example 2 (adding parameters directly to url):

 var encoder = java.net.URLEncoder;
 var encoding = "UTF-8";
 var parm1 = encoder.encode(fields.APPL_STATUS.displayValue, encoding);
 var parm2 = "MENU";
 var url = "http://www.xxx.com" 
  + "?status=" + parm1
  + "&next=" + parm2;
 form.gotoUrl(url, null, form.HTTP_PROTOCOL_GET);
 

Parameters

java.lang.String  url,  java.util.Map  parameters,  java.lang.String  httpProtocol,